/**
 *Copyright (c) 2003, 2018, UMF and/or its affiliates. All rights reserved.
 */
package com.umf.b2b.model.pay;

import com.umf.b2b.MerchantBaseRequest;
import com.umpay.dto.UMFResponse.Message;
import com.umpay.util.UMFUtil;

/**
<p>Title:PaymentEntrustmentReq</p>  
<p>Description:��ҵί��֧��-ǩԼ����</p>
 */
public class PaymentEntrustmentReq extends MerchantBaseRequest{
	
	private String order_id;//*����ش� �̻����ɵı�ʶ�ñʽ��׵ı�ţ����֧�����֡�Ӣ����ĸ���ʹ�ã�����Ϊ�ַ����������ű���Ψһ
	private String mer_date;//*����ش� ƽ̨���ɶ��������ڣ���ʽYYYYMMDD������Ϊ�ַ���
	private String mer_cust_id;//����ش� �̻�ƽ̨�����̻������Ψһ���
	private String bank_mobile_id;//����ش� �ֿ��������п����ÿ�ʱ�����еǼǵ��ֻ���
	private String card_id;//����ش� ���п��ţ�����CipherUtil.encrypt���ܱ���
	private String card_holder;//����ش� �ֿ�������������CipherUtil.encrypt���ܱ���
	private String identity_type;//����ش� �̶�Ϊ��1�����֤��
	private String identity_code;//����ش� ֤�����룬����CipherUtil.encrypt���ܱ���
	
	private String url = "/payment/entrustment/req";
	
	private String trade_no;//[��Ӧ����] ������
	private String p_agreement_id;// [��Ӧ����] ��������Ϊ��ǩԼʱ���᷵��֧��Э��š�

	@Override
	public String getRequestUrl() {
		return baseUrl + url;
	}

	@Override
	public PaymentEntrustmentReq doRequest() throws Exception {
		Message<PaymentEntrustmentReq> response = UMFUtil.post(createAPIContext(), this,PaymentEntrustmentReq.class);
		MerchantBaseRequest baseResult = convertResult(response, PaymentEntrustmentReq.class);
		if(baseResult == null)
			return null;
		return (PaymentEntrustmentReq)baseResult;
	}

	public String getMer_id() {
		return mer_id;
	}

	public void setMer_id(String mer_id) {
		this.mer_id = mer_id;
	}

	public String getTrade_no() {
		return trade_no;
	}

	public void setTrade_no(String trade_no) {
		this.trade_no = trade_no;
	}

	public String getMer_cust_id() {
		return mer_cust_id;
	}

	public void setMer_cust_id(String mer_cust_id) {
		this.mer_cust_id = mer_cust_id;
	}

	public String getCard_id() {
		return card_id;
	}

	public void setCard_id(String card_id) {
		this.card_id = card_id;
	}

	public String getP_agreement_id() {
		return p_agreement_id;
	}

	public void setP_agreement_id(String p_agreement_id) {
		this.p_agreement_id = p_agreement_id;
	}

	public String getOrder_id() {
		return order_id;
	}

	public void setOrder_id(String order_id) {
		this.order_id = order_id;
	}

	public String getMer_date() {
		return mer_date;
	}

	public void setMer_date(String mer_date) {
		this.mer_date = mer_date;
	}

	public String getBank_mobile_id() {
		return bank_mobile_id;
	}

	public void setBank_mobile_id(String bank_mobile_id) {
		this.bank_mobile_id = bank_mobile_id;
	}

	public String getCard_holder() {
		return card_holder;
	}

	public void setCard_holder(String card_holder) {
		this.card_holder = card_holder;
	}

	public String getIdentity_type() {
		return identity_type;
	}

	public void setIdentity_type(String identity_type) {
		this.identity_type = identity_type;
	}

	public String getIdentity_code() {
		return identity_code;
	}

	public void setIdentity_code(String identity_code) {
		this.identity_code = identity_code;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("PaymentEntrustmentReq [mer_id=");
		builder.append(mer_id);
		builder.append(", order_id=");
		builder.append(order_id);
		builder.append(", mer_date=");
		builder.append(mer_date);
		builder.append(", mer_cust_id=");
		builder.append(mer_cust_id);
		builder.append(", bank_mobile_id=");
		builder.append(bank_mobile_id);
		builder.append(", card_id=");
		builder.append(card_id);
		builder.append(", card_holder=");
		builder.append(card_holder);
		builder.append(", identity_type=");
		builder.append(identity_type);
		builder.append(", identity_code=");
		builder.append(identity_code);
		builder.append(", trade_no=");
		builder.append(trade_no);
		builder.append(", p_agreement_id=");
		builder.append(p_agreement_id);
		builder.append(", url=");
		builder.append(url);
		builder.append(", version=");
		builder.append(version);
		builder.append(", ret_code=");
		builder.append(ret_code);
		builder.append(", ret_msg=");
		builder.append(ret_msg);
		builder.append(", links=");
		builder.append(links);
		builder.append("]");
		return builder.toString();
	}
}
